package com.abel.serviceuser.service.impl;

import com.abel.servicemodel.user.Login;
import com.abel.serviceuser.mapper.LoginMapper;
import com.abel.serviceuser.service.LoginService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
public class LoginServiceImpl implements LoginService {
    @Resource
    private LoginMapper loginMapper;
    @Override
    public Login login(String username, String pwd) {
       Login login=  loginMapper.findPwdByUserName(username);
        if(login==null||!login.getPwd().equals(pwd)){
            return null;
        }
        System.out.println(login);
        return login;
    }
}
